Wearable camera and a method for encoding video captured by the wearable camera

ABSTRACT

A method and wearable camera for encoding video captured by a wearable camera determines a centre of rotation for an image frame to be encoded. The centre of rotation relates to a rotation of the wearable camera at the time of capturing the video and the image frame comprises multiple groups of pixels. Furthermore, compression levels are set for the multiple groups of pixels of the image frame. The compression levels for the multiple groups of pixels of the image frame are set such that a level of compression increases with a radial distance from the centre of rotation. The image frame is encoded using the compression levels.

FIELD OF INVENTION

The present invention relates to video encoding, and specifically toencoding video captured by a wearable camera.

TECHINICAL BACKGROUND

Wearable cameras are used, e.g., by police officers, for capturing avideo stream during patrols and incidents. Such cameras may also bereferred to as body worn cameras, BWCs. Wearable cameras are typicallybattery powered. Hence, there are limitations in power available for awearable camera. Furthermore, wearable cameras may transmit a capturedvideo stream via a wireless connection. Hence, the bitrate available forsuch transmission is also a limiting factor in relation to encoding ofthe video stream.

SUMMARY

Facilitating bitrate savings and/or battery savings for a video streamgenerated by a wearable camera would be beneficial.

According to a first aspect a method for encoding video captured by awearable camera comprises determining a centre of rotation for an imageframe to be encoded. The centre of rotation relates to a rotation of thewearable camera at the time of capturing the video. The image framecomprises multiple groups of pixels. The method further comprisessetting compression levels for the multiple groups of pixels of theimage frame, wherein the compression levels for the multiple groups ofpixels of the image frame are such that a level of compression increaseswith a radial distance from the centre of rotation. The method furthercomprises encoding the image frame using the compression levels.

Rotational movements of a wearable camera occur when in use and suchrotational movements lead to movements in the captured images. For suchrotational movements, the movement of groups of pixels betweenconsecutive image frames will increase with a radial distance from acentre of rotation in the image frame corresponding to a centre ofrotation of an image sensor of the wearable camera. This will result inan increased risk of failure of identification of motion vectors with aradial distance from the centre of rotation which will lead to problemwith high bitrates, thereby increasing the risk of having to encodeblocks of pixels using intra-coding instead of generally lessbit-consuming inter-coding. This risk will be more prominent for motionestimation algorithms best suited for (e.g., byconfiguration/optimization) identification of translational motion.Thus, a specific compression principle is introduced where the level ofcompression is increased with the radial distance from the centre ofrotation.

By increasing the level of compression with the radial distance from thecentre of rotation, the total bitrate required to encode a videoincluding the image frame is reduced in relation to if the level ofcompression would have been uniformly the same as the level ofcompression in the centre of rotation.

Reducing the bitrate is beneficial, e.g., in that the bandwidth requiredfor wirelessly transmitting the resulting video stream is reduced andthe storage space required for storing a resulting video stream isreduced.

Due to the increased risk of failure of identification of motion vectorswith the radial distance from the centre of rotation, the bitrate costfor groups of pixels will generally also increase with the radialdistance from the centre of rotation of the groups of pixels. Hence,increasing the level of compression with the radial distance from thecentre of rotation will result in a higher level of compression forgroups of pixels for which the bitrate cost would have been higher.

Furthermore, as the effects of motion blur will generally increase witha radial distance from the centre of rotation, it is advantageous toenable higher image quality (resolution) by means of lower compressioncloser to the centre of rotation where the motion blur is generally atis lowest.

As portions of the image frame closer to the centre of rotation may alsobe portions that are of more interest than more peripheral portionsfurther away from the centre of rotation, it is advantageous to enablehigher image quality (resolution) by means of lower compression closerto the centre of rotation.

Additionally, as the effects of motion blur will generally increase withthe radial distance from the centre of rotation, the loss of imagequality further away from the centre of rotation will matter less sincethe effects of motion blur further away from the centre of rotationwould have affected the image quality anyway.

The groups of pixels may for example be referred to as blocks,macroblocks, or coding tree units.

The compression levels for the multiple groups of pixels of the imageframe may for example be compression values, such as values ofquantization parameters for the multiple groups of pixels of the imageframe.

The act of determining the centre of rotation of the method may furthercomprise determining the centre of rotation using data from one or moremovement sensors in the wearable camera.

The method may further comprise determining motion vectors for the imageframe. The act of determining the centre of rotation may then furthercomprise determining the centre of rotation using the motion vectors.

The method may further comprise determining a preliminary centre ofrotation for the image frame and setting a motion vector search areaincluding the preliminary centre of rotation, wherein the motion vectorsearch area is a subarea of the image frame. The act of determining themotion vectors may then comprise determining the motion vectors in themotion vector search area. The reliability of determined motion vectorsis generally decreased with the radial distance from the centre ofrotation. Hence, selecting a motion vector search area which is asubarea of the image and that includes the preliminary centre ofrotation will exclude an area of the image frame that includes themotion vectors that would be the least reliable. Consequently, a morereliable identification of the centre of rotation is enabled.

The method may further comprise obtaining a previous centre of rotationfor a previous image frame. The act of determining a preliminary centreof rotation may then comprise determining the preliminary centre ofrotation for the image frame to correspond to the previous centre ofrotation. The centre of rotation tends to move around betweenconsecutive image frames but not to a very large extent. Hence, theprevious centre of rotation, i.e., the centre of rotation of a previousimage frame, is a good approximation to use as the preliminary centre ofrotation. Preferably, the previous centre of rotation is the centre ofrotation of the immediately preceding image frame.

The method may further comprise determining an angular velocity of thewearable camera at a time of capturing the image frame. In the act ofsetting the compression levels, a rate of increase of the level ofcompression with the radial distance from the centre of rotation maythen be based on the angular velocity. The incentive to increase thelevel of compression becomes larger with the amount of motion in theimage frame. For a rotation, the motion in the image frame depends onthe radial distance from the centre of rotation but also on the angularvelocity. For a higher angular velocity, the motion will be higher atthe same radial distance from the centre of rotation. Hence, it isbeneficial not only to increase the level of compression with the radialdistance from the centre of rotation but also the rate of increase basedon the angular velocity. The loss of image quality for a higher angularvelocity will matter less since the effects of motion blur at the higherangular velocity would have affected the image quality anyway.

The method may further comprise determining motion vectors for the imageframe. In the act of setting the compression levels, a rate of increaseof the level of compression with the radial distance from the centre ofrotation may then be based on the motion vectors. For example, the rateof increase of the level of compression may be based on a rate ofincrease of the length of the motion vectors with the radial distancefrom the centre of rotation.

According to a second aspect a non-transitory computer readable mediumis provided. The non-transitory computer readable medium hasinstructions, possibly in the form of computer readable program code,stored thereon which when executed on a device having processingcapability is configured to perform the method of the first aspect. Thedevice having processing capability may be a wearable camera, e.g., abody worn camera.

The above-mentioned features of the method according to the firstaspect, when applicable, apply to this second aspect as well. In orderto avoid undue repetition, reference is made to the above.

According to a third aspect a wearable camera is provided. The wearablecamera comprises an image sensor, circuitry and an encoder. The imagesensor is configured to capture image data. The circuitry is configuredto execute a centre of rotation determining function configured todetermine a centre of rotation for an image frame to be encoded. Thecentre of rotation relates to a rotation of the wearable camera at thetime of capturing the video. The image frame is based on the image dataand comprises multiple groups of pixels. The circuitry is furtherconfigured to execute a compression level setting function configured toset compression levels for the multiple groups of pixels of the imageframe, wherein the compression levels for the multiple groups of pixelsof the image frame are such that a level of compression increases with aradial distance from the centre of rotation. The encoder is configuredto encode the image frame into a video stream using the compressionlevels set by the compression level setting function.

The wearable camera may further comprise a movement sensor fordetermining movement data for the wearable camera. The centre ofrotation determining function may then be further configured todetermine the centre of rotation using the movement data from themovement sensor.

The encoder of the wearable camera may be further configured todetermine motion vectors for the image frame. The centre of rotationdetermining function may then be further configured to determine thecentre of rotation using the motion vectors.

The circuitry of the wearable camera may be further configured toexecute a preliminary centre of rotation determining function configuredto determine a preliminary centre of rotation for the image frame, and amotion vector search area setting function configured to set a motionvector search area including the preliminary centre of rotation, themotion vector search area being a subarea of the image frame. Theencoder may then be configured to determine the motion vectors in themotion vector search area.

The circuitry of the wearable camera may be further configured toexecute a previous centre of rotation obtaining function configured toobtain a previous centre of rotation for a previous image frame. Thepreliminary centre of rotation determining function may then beconfigured to determine the preliminary centre of rotation for the imageframe to correspond to the previous centre of rotation.

The circuitry of the wearable camera may be further configured toexecute an angular velocity determining function configured to determinean angular velocity of the wearable camera at a time of capturing theimage frame. In the compression level setting function, a rate ofincrease of the compression levels with the radial distance from thecentre of rotation may then be based on the angular velocity.

The encoder of the wearable camera may further be configured todetermine motion vectors for the image frame. In the compression levelsetting function, a rate of increase of the level of compression withthe radial distance from the centre of rotation may then be based on themotion vectors.

A further scope of applicability of the present embodiments will becomeapparent from the detailed description given below. However, it shouldbe understood that the detailed description and specific examples, whileindicating preferred embodiments, are given by way of illustration only,since various changes and modifications within the scope of the claimswill become apparent to those skilled in the art from this detaileddescription.

Hence, it is to be understood that the embodiments are not limited tothe particular component parts of the device described or acts of themethods described as such device and method may vary. It is also to beunderstood that the terminology used herein is for purpose of describingparticular embodiments only and is not intended to be limiting. It mustbe noted that, as used in the specification and the appended claim, thearticles “a,” “an,” “the,” and “said” are intended to mean that thereare one or more of the elements unless the context clearly dictatesotherwise. Thus, for example, reference to “a unit” or “the unit” mayinclude several devices, and the like. Furthermore, the words“comprising”, “including”, “containing” and similar wordings do notexclude other elements or steps.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects will now be described in more detail, withreference to appended figures. The figures should not be consideredlimiting but are instead used for explaining and understanding. Likereference numerals refer to like elements throughout.

FIG. 1 is a schematic block diagram of a wearable camera.

FIG. 2 is a flow chart of a method for encoding video captured by awearable camera.

DETAILED DESCRIPTION

The present embodiments will now be described more fully hereinafterwith reference to the accompanying drawings, in which currentlypreferred embodiments are shown. However, they may be embodied in manydifferent forms and should not be construed as limited to theembodiments set forth herein. Rather, these embodiments are provided forthoroughness and completeness, and to convey the scope of the claims tothe skilled person.

FIG. 1 illustrates a wearable camera 100. The wearable camera 100 may bea body worn camera, BWC. The wearable camera 100 may be a separate unitor it may be integrated in another unit, such as in a helmet, glassesetc. The wearable camera 100 may be used, e.g., by police officers, forcapturing video and possibly other data during patrols and incidents.Captured data may subsequently be needed as evidence, for example wheninvestigating crimes and prosecuting suspected criminals. In order topreserve the captured data, a data management system external from thewearable camera 100, such as a video management system or an evidencemanagement system, may be used. Such data management systems generallyprovide storage of captured data, and also viewing of the captured data,either in real time or as a playback of recorded data. Typically, thewearable camera 100 is battery powered and has a limited bitrate. Thelatter may be due to limited local data storage and/or limitations inbandwidth for a wireless connection to the data management system or toa central where a live feed is viewed. Furthermore, the limitation inbandwidth for the wireless connection may vary over time such that thebitrate occasionally becomes even more limited. The wearable camera 100comprises an image sensor 110, circuitry 130, and an encoder 120.

The image sensor 110 is configured to capture image data. The image datamay, e.g., be data of image frames. Image sensors and capturing of imagedata are well known for the person skilled in the art and will not bediscussed in any more detail in this disclosure.

The encoder 120 is configured to encode image data captured by the imagesensor 110 into a video stream, sometimes the video stream provided bythe encoder 120 is referred to as an encoded video stream. Typically,the video encoder 120 is configured to encode some of the image framesof the video stream as intra frames or key frames and some of the imageframes of the video stream as inter frames or delta frames. An intraframe is an encoded video frame that does not require information fromother encoded video frames to be decoded. Hence, an intra frame isencoded based on information from the image frame of video data it isset to correspond to. Typically, similarities within the image frame areused to encode the image frame into an intra frame. In video encoding anintra frame is often referred to as an I-frame. The image frames of thevideo stream in between two intra frames are encoded as inter frames.Typically, an inter frame only comprises changes that occur from oneframe to the next. Hence, inter frames are typically comprising lessdata than intra frames. In video encoding an inter frame is oftenreferred to as a P-frame or a B-frame. P-frames refer to previous framesfor data reference. Hence, the content of previous frames must be knownin order to decode a P-frame. B-frames may refer to both previous andforward frames for data reference. Hence, the content of both theprevious and forward frames must be known in order to decode a B-frame.When encoding an inter frame, an image frame is divided into multiplegroups of pixels. The groups of pixels may for example be referred to asblocks, macroblocks, or coding tree units. The image frame is comparedto a reference frame. For example, the reference frame for encoding aP-frame is a previous image frame. A matching algorithm is used toidentify matching groups of pixels between the image frame to be encodedand the reference frame and if a match is found for a group of pixels,that group of pixels may be encoded as a motion vector specifying howthe group of pixels has moved in the image frame since the referenceframe. Determining motion vectors is sometimes referred to as motionestimation. If the movement is large due to fast movement of the cameraor of objects in the captured scene, the motion estimation may fail inidentifying motion vectors. The fewer motion vectors identified for animage frame to be encoded, the larger the resulting encoded inter framewill become in bit size and hence, the larger bandwidth will be requiredto transmit the encoded inter frame.

The circuitry 130 is configured to carry out functions of the wearablecamera 100. The circuitry 130 may include a processor 132, such as acentral processing unit (CPU), microcontroller, or microprocessor. Theprocessor 132 is configured to execute program code. The program codemay for example be configured to carry out the functions of the wearablecamera 100.

The wearable camera 100 may further comprise a movement sensor 140 fordetermining movement data for the wearable camera. The movement sensor140 is configured to measure movement data of the wearable device. Themovement sensor 140 may comprise a gyroscope and/or an accelerometer.The gyroscope is configured to measure movement data in the form oforientation and/or angular velocity of the wearable camera 100. Theaccelerometer is configured to measure movement data in the form ofacceleration (or rate of change of velocity) of the wearable camera 100in its own instantaneous rest frame. The movement sensor 140 isconfigured to sample the movement data as a function of time.

The wearable camera 100 may further comprise a local data storage 150.The local data storage 150 may be configured to store the video stream.The local data storage typically has a limited data storage capacity.The local data storage 150 may be any type of local data storagesuitable for storage of a video stream. For example, the local datastorage 150 may be in the form of an SD card reader and an SD card.Another example of a local data storage 150 may be in the form of aflash memory, e.g., a NAND flash.

The wearable camera 100 may further comprise a transmitter 160. Thetransmitter 160 may be configured to wirelessly transmit the videostream to the data management system. The transmitter 160 may beconfigured to continuously transfer the captured video stream to thevideo management system. The wireless transfer is typically limited dueto bandwidth available for the wireless transfer.

The wearable camera 100 may further comprise a memory 170. The memory170 may be one or more of a buffer, a flash memory, a hard drive, aremovable media, a volatile memory, a non-volatile memory, a randomaccess memory (RAM), or another suitable device. In a typicalarrangement, the memory 170 may include a non-volatile memory for longterm data storage and a volatile memory that functions as system memoryfor the circuitry 130. The memory 170 may exchange data with thecircuitry 130 over a data bus. Accompanying control lines and an addressbus between the memory 170 and the circuitry 130 also may be present.

Functions of the wearable camera 100 may be embodied in the form ofexecutable logic routines (e.g., lines of code, software programs, etc.)that are stored on a non-transitory computer readable medium (e.g., thememory 170) of the wearable camera 100 and are executed by the circuitry130 (e.g., using the processor 132). Furthermore, the functions of thewearable camera 100 may be a stand-alone software application or form apart of a software application that carries out additional tasks relatedto the wearable camera 100. The described functions may be considered amethod that a processing unit, e.g., the processor 132 of the circuitry130 is configured to carry out. Also, while the described functions maybe implemented in software, such functionality may as well be carriedout via dedicated hardware or firmware, or some combination of hardware,firmware and/or software.

The circuitry 130 is configured to execute a centre of rotationdetermining function 181. The centre of rotation determining function181 is configured to determine a centre of rotation for an image frameto be encoded. The centre of rotation relates to a rotation of thewearable camera at the time of capturing the video. Specifically, thecentre of rotation for the image frame corresponds to an image sensorcentre of rotation around which the wearable camera 100 rotates at thetime of capturing the image data on which the image frame is based. Theimage frame is typically divided into multiple groups of pixels used inthe encoding of the image frame.

The circuitry 130 is configured to execute a compression level settingfunction 182. The compression level setting function 182 is configuredto set compression levels for the multiple groups of pixels of the imageframe. The compression levels for the multiple groups of pixels of theimage frame are set such that a level of compression increases with aradial distance from the centre of rotation. Generally, if a first groupof pixels is at a larger radial distance from the centre of rotationthan a second group of pixels, the first group of pixels will have ahigher level of compression than the second group of pixels. The levelof compression may be continuously increased with the radial distancefrom the centre of rotation. However, the level of compression may alsobe increased stepwise such that first groups of pixels within a firstradial distance range from the centre of rotation have the same firstlevel of compression, second groups of pixels within a second radialdistance range from the centre of rotation including radial distanceslarger than the first radial distance range have the same second levelof compression, etc.

Increasing the level of compression may further be done non-uniformlysuch that for example, the level of compression is increased at a higherrate with the distance from the centre of rotation in a horizontaldirection than with the distance in a vertical direction. For such anon-uniform increase, a level of compression at a given distance fromthe centre of rotation along a horizontal line from the centre ofrotation will have be higher than the level of compression at the givendistance from the centre of rotation along a line that is at an anglelarger than 0 degrees from the centre of rotation. Generally, the levelof compression may not only be based on the need of compression due tothe higher degree of motion further away from the centre of rotation butalso on an expected level of interest in different portions of the imageframe. It may for example be so that the periphery of the image frame inhorizontal direction is of less interest than the periphery of the imageframe in the vertical direction.

Compression levels may relate to different measures and properties thatindicate a level of compression. For example, the compression levels mayrelate to compression values, such as values of a quantization parametersuch that the values of the quantization parameter are set such thatthey are increased with the radial distance from the centre of rotation.In such a case, if a first group of pixels is at a larger radialdistance from the centre of rotation than a second group of pixels, thefirst group of pixels will have a higher value of the quantizationparameter than the second group of pixels. This may for example beachieved by means of a gradient quantization parameter map (QMAP).

The compression levels may further describe or indicate the bitraterequired for encoding. Hence, as long as the bitrate required becomeslower, the level of compression is considered to become higherregardless of the means or process used to achieve the lower bitraterequired. For example, the level of compression may be increased bymeans of using a different encoding scheme for blocks depending on theradial distance from the centre of rotation. Examples of such encodingis the use of skip blocks or DC coded (i.e., single colour) I blocks forgroups of images which would result in a higher level of compression inrelation to encoding them as ordinary P or B blocks. A skip block has noimage information or prediction information and a decoder interprets askip block as a block (group of pixels) being identical to thecorresponding block (group of pixels) of a previous frame. A skip blockmay still have a motion vector, which it inherits from its neighbours.However, no information is encoded. To increase the level ofcompression, the selection of type of block (I, P, skip) could be biasedso that the probability of block types corresponding to higher level ofcompression is increased with the distance from the centre of rotation.

The encoder 120 may then be configured to encode the image frame into avideo stream using the compression levels set by the compression levelsetting function 182.

The increased compression level with the radial distance from the centreof rotation will decrease the bitrate of a video stream of such encodedframes, and will be lower than the bitrate would have been if the videostream would have included image frames having the same compressionlevel at the centre of rotation but without any increase of compressionlevel with the radial distance from the centre of rotation. Furthermore,increasing the compression level with the radial distance from thecentre of rotation will maintain high quality (low compression) forgroups of pixels closer to the centre of rotation. This is beneficialsince these groups of pixels are less affected by motion blur, requireless bitrate for encoding, are easier to find corresponding motionvectors for, and often relate to regions of interest since they depictwhat is straight in front of the wearable camera. Furthermore, most ofthe reduced bitrate is achieved by higher compression level at theperiphery in relation to the centre of rotation. Higher level ofcompression for such groups of pixels is beneficial since these groupsof pixels are more affected by motion blur, require higher bitrate forencoding, are more difficult to find corresponding motion vectors for,and often relate to regions of less interest since they depict what isin the periphery in relation to the centre of rotation. As compared toincreasing the compression uniformly in the image frame and reducing theframe rate, such methods for bitrate reduction would not achieve theabove identified benefits.

The centre of rotation determining function 181 may be configured todetermine the centre of rotation using the movement data from themovement sensor 140 for example comprising a gyroscope and/or anaccelerometer.

The encoder 120 may be configured to determine motion vectors for theimage frame. The centre of rotation determining function 181 is furtherconfigured to determine the centre of rotation using the motion vectors.For a rotational motion, the motion vectors will produce a circularpattern around the centre of rotation and increase in length with aradial distance from the centre of rotation. Hence, the identifiedmotion vectors may be analysed using a suitable algorithm to determinethe centre of rotation.

The circuitry 130 may be configured to execute a preliminary centre ofrotation determining function 183 and a motion vector search areasetting function 184. The preliminary centre of rotation determiningfunction 183 is configured to determine a preliminary centre of rotationfor the image frame. The motion vector search area setting function 184is configured to set a motion vector search area including thepreliminary centre of rotation, wherein the motion vector search area isa subarea of the image frame. The encoder 120 may then be configured todetermine the motion vectors in the motion vector search area. Thecentre of rotation determining function 181 may then be configured todetermine the centre of rotation using the motion vectors in the motionvector search area. The basis for this is that the reliability ofdetermined motion vectors generally decreases with the radial distancefrom the centre of rotation since the radial distance a group of pixelmoves between two consecutive image frames increases with the radialdistance from the centre of rotation which in turn makes determinationof motion vectors increasingly difficult. Hence, using only the motionvectors in the subarea will exclude an area of the image frame thatincludes the motion vectors that would be the least reliable. Hence, amore reliable identification of the centre of rotation is enabled. Themotion vector search area may, for example, be set such that it includesgroups of pixels for which the motion vectors may be determined with adesired reliability. The encoder 120 may then be configured to determinethe motion vectors of the image frame outside the motion vector searcharea. However, such motion vectors would then only be used by theencoder 120 to encode the image frame and not be used by the centre ofrotation determining function 181 to determine the centre of rotation.

The encoder 120 may alternatively be configured to determine the motionvectors of the image frame only in the motion vector search area. Insuch a case, the motion vector search area may be set to exclude groupsof pixels for which the encoder 120 has a probability of failing todetermine motion vectors over a threshold. The probability of failingwill increase with an increased motion. Hence, the groups of pixelsexcluded may be elected as groups of pixels more than a threshold radialdistance from the preliminary centre of rotation. The threshold radialdistance may for example be based on an angular velocity. For theexcluded groups of pixels, i.e., groups of pixels for which no motionvectors have been determined, the level of compression can be furtherincreased to compensate for the additional bitrate required for encodingwithout any identified motion vectors. The increased level ofcompression can be achieved by means of adapting quantization parametervalues for the groups of pixels for which no motion vectors have beendetermined. In alternative, the groups of pixels for which no motionvectors have been determined may be encoded as skip blocks or DC coded(i.e., single colour) I blocks.

The circuitry 130 may be configured to execute a previous centre ofrotation obtaining function 185. The previous centre of rotationobtaining function 185 is configured to obtain a previous centre ofrotation for a previous image frame. The preliminary centre of rotationdetermining function 183 may then be configured to determine thepreliminary centre of rotation for the image frame to correspond to theprevious centre of rotation. As the centre of rotation generally doesnot move very far between consecutive image frames, using the previouscentre of rotation for the previous image frame will generally be a goodapproximation to use as the preliminary centre of rotation.

The circuitry may be configured to execute an angular velocitydetermining function 186. The angular velocity determining function 186is configured to determine an angular velocity of the wearable camera ata time of capturing the image frame. The compression level settingfunction 182 may then be configured such that a rate of increase of thelevel of compression with the radial distance from the centre ofrotation is based on the angular velocity. Generally, the level ofcompression should be increased with increased amount of motion in theimage frame. For a rotation, the amount of motion in the image framedepends on the radial distance from the centre of rotation but also onthe angular velocity. For a higher angular velocity, the amount ofmotion will be larger at a same radial distance from the centre ofrotation than it would have been for a lower angular velocity. Hence,the level of compression may be increased at a higher rate with theradial distance from the centre of rotation for higher angular velocitysuch that the level of compression will be higher at a same radialdistance from the centre of rotation than it would have been for a lowerangular velocity. The angular velocity may be determined by means ofdata from the movement sensor 140, e.g., by means of a gyroscope.

Alternatively, or additionally, based on motion vectors determined bythe encoder 120, the compression level setting function 182 may beconfigured such that a rate of increase of the level of compression withthe radial distance from the centre of rotation is based on the motionvectors. For example, for a higher angular velocity, the determinedmotion vectors will increase in length with the radial distance from thecentre of rotation at a higher rate than they would for a lower angularvelocity. Hence, the rate of increase of the level of compression may beset to be proportional to the rate of increase of the length of themotion vectors with the radial distance from the centre of rotation.Analogously, the level of compression for the groups of pixels may beset to be proportional to the length of their respective motion vectors.

In connection with FIG. 2 a method 200 for encoding video captured by awearable camera will be discussed. The method 200 is based on theinsight made by the inventor that by increasing a compression level witha radial distance from a centre of rotation, the bitrate required forencoding may be reduced without a correspondingly large loss of quality,e.g., since the higher level of compression will apply for groups ofpixels which would have carried less relevant information and/or wouldhave had a lower quality even without the higher level of compression.

Some of all the steps of the method 200 may be performed by thefunctions of the wearable camera 100 described above. The methodcomprises the following steps. Unless a step specifically depends on theresult of another step, the steps may be performed in any suitableorder.

The method comprises determining S220 a centre of rotation for an imageframe to be encoded, the centre of rotation relating to a rotation ofthe wearable camera at the time of capturing the video, and the imageframe comprising multiple groups of pixels. The method 200 furthercomprises setting S222 compression levels for the multiple groups ofpixels of the image frame, wherein the compression levels for themultiple groups of pixels of the image frame are such that a level ofcompression increases with a radial distance from the centre ofrotation. The method 200 further comprises encoding S224 the image frameusing the compression levels.

The determining S220 of the centre of rotation may further comprisedetermining the centre of rotation using data from one or more movementsensors in the wearable camera.

The method 200 may further comprise determining S210 motion vectors forthe image frame. The determining S220 of the centre of rotation may thenfurther comprise determining the centre of rotation using data using themotion vectors.

The method 200 may further comprise determining S206 a preliminarycentre of rotation for the image frame and setting S208 a motion vectorsearch area including the preliminary centre of rotation, the motionvector search area being a subarea of the image frame. The determiningS208 of the motion vectors may then comprise determining the motionvectors in the motion vector search area.

The method 200 may further comprise obtaining S204 a previous centre ofrotation for a previous image frame. The determining S206 of thepreliminary centre of rotation may then comprises determining thepreliminary centre of rotation for the image frame to correspond to theprevious centre of rotation.

The method 200 may further comprise determining S202 an angular velocityof the wearable camera at a time of capturing the image frame. In thesetting S222 of the compression levels, a rate of increase of the levelof compression with the radial distance from the centre of rotation isbased on the angular velocity.

The method may further comprise storing the video stream in the wearablecamera. The method may further comprise wirelessly transmitting thevideo stream from the wearable camera. The method may further comprisecorresponding features to features disclosed for the wearable cameradescribed in relation to FIG. 1 .

The person skilled in the art realizes that the present teachings arenot limited to the embodiments described above. On the contrary, manymodifications and variations are possible within the scope of theappended claims. Such modifications and variations can be understood andeffected by a skilled person in practicing the teachings, from a studyof the drawings, the disclosure, and the appended claims.

The invention claimed is:
 1. A method for encoding video captured by awearable camera, the method comprising: determining a centre of rotationin an image frame to be encoded, the centre of rotation relating to arotational movement of the wearable camera at the time of capturing thevideo, wherein the centre of rotation corresponds to an image sensorcentre of rotation around which the wearable camera rotates at the timeof capturing image data on which the image frame is based, and whereinthe image frame comprises multiple groups of pixels; setting compressionlevels for the multiple groups of pixels of the image frame, wherein thecompression levels for the multiple groups of pixels of the image frameare such that a level of compression increases with a radial distancefrom the centre of rotation; and encoding the image frame using thecompression levels.
 2. The method of claim 1, wherein the act ofdetermining the centre of rotation further comprises: determining thecentre of rotation using data from one or more movement sensors in thewearable camera.
 3. The method of claim 1, further comprising:determining motion vectors for the image frame, wherein the act ofdetermining the centre of rotation further comprises: determining thecentre of rotation using the motion vectors.
 4. The method of claim 3,further comprising: determining a preliminary centre of rotation for theimage frame; and setting a motion vector search area including thepreliminary centre of rotation, the motion vector search area being asubarea of the image frame, wherein the act of determining the motionvectors comprises: determining the motion vectors in the motion vectorsearch area.
 5. The method of claim 4, further comprising: obtaining aprevious centre of rotation for a previous image frame, wherein the actof determining a preliminary centre of rotation comprises: determiningthe preliminary centre of rotation for the image frame to correspond tothe previous centre of rotation.
 6. The method of claim 1, furthercomprising: determining an angular velocity of the wearable camera at atime of capturing the image frame, wherein, in the act of setting thecompression levels, a rate of increase of the level of compression withthe radial distance from the centre of rotation is based on the angularvelocity.
 7. The method of claim 1, further comprising: determiningmotion vectors for the image frame; wherein, in the act of setting thecompression levels, a rate of increase of the level of compression withthe radial distance from the centre of rotation is based on the motionvectors.
 8. A non-transitory computer readable storage medium havingstored thereon instructions for encoding video captured by a wearablecamera, the instructions implementing a method comprising: determining acentre of rotation in an image frame to be encoded, the centre ofrotation relating to a rotational movement of the wearable camera at thetime of capturing the video, wherein the centre of rotation correspondsto an image sensor centre of rotation around which the wearable camerarotates at the time of capturing image data on which the image frame isbased, and wherein the image frame comprises multiple groups of pixels;setting compression levels for the multiple groups of pixels of theimage frame, wherein the compression levels for the multiple groups ofpixels of the image frame are such that a level of compression increaseswith a radial distance from the centre of rotation; and encoding theimage frame using the compression levels.
 9. A wearable cameracomprising: an image sensor configured to capture image data; circuitryconfigured to execute: a centre of rotation determining functionconfigured to determine a centre of rotation in an image frame to beencoded, the centre of rotation relating to a rotational movement of thewearable camera at the time of capturing the image data, wherein thecentre of rotation corresponds to the image sensor centre of rotationaround which the wearable camera rotates at the time of capturing imagedata on which the image frame is based, and wherein the image framecomprises multiple groups of pixels; a compression level settingfunction configured to set compression levels for the multiple groups ofpixels of the image frame, wherein the compression levels for themultiple groups of pixels of the image frame are such that a level ofcompression increases with a radial distance from the centre ofrotation; an encoder configured to encode the image frame into a videostream using the compression levels set by the compression level settingfunction.
 10. The wearable camera of claim 9, further comprising: amovement sensor for determining movement data for the wearable camera,wherein the centre of rotation determining function is furtherconfigured to determine the centre of rotation using the movement datafrom the movement sensor.
 11. The wearable camera of claim 9, whereinthe encoder is further configured to determine motion vectors for theimage frame, and wherein the centre of rotation determining function isfurther configured to determine the centre of rotation using the motionvectors.
 12. The wearable camera of claim 11, wherein the circuitry isfurther configured to execute: a preliminary centre of rotationdetermining function configured to determine a preliminary centre ofrotation for the image frame; and a motion vector search area settingfunction configured to set a motion vector search area including thepreliminary centre of rotation, the motion vector search area being asubarea of the image frame, and wherein the encoder is configured todetermine the motion vectors in the motion vector search area.
 13. Thewearable camera of claim 12, wherein the circuitry is further configuredto execute: a previous centre of rotation obtaining function configuredto obtain a previous centre of rotation for a previous image frame,wherein the preliminary centre of rotation determining function isconfigured to determine the preliminary centre of rotation for the imageframe to correspond to the previous centre of rotation.
 14. The wearablecamera of claim 9, wherein the circuitry is further configured toexecute: an angular velocity determining function configured todetermine an angular velocity of the wearable camera at a time ofcapturing the image frame, wherein, in the compression level settingfunction, a rate of increase of the level of compression with the radialdistance from the centre of rotation is based on the angular velocity.15. The wearable camera of claim 9, wherein the encoder is furtherconfigured to determine motion vectors for the image frame, and wherein,in the compression level setting function, a rate of increase of thelevel of compression with the radial distance from the centre ofrotation is based on the motion vectors.